<template>
  <ul class="center">
   <!-- 使用子组件标签 -->
   <CartItem v-for="good in list" :good="good" :key="good.id" />
  </ul>
</template>

<script>
//引入子组件--li
import CartItem from './CartItem.vue';
export default{
    name:"CartList",
    props:["list"],
    components:{
        //注册子组件
        CartItem,
    },
};

</script>

<style>
.center {
  width: 100%;
}
</style>
